import axios from '@/common/plugins/Axios'

export default {
    // 机器人平台列表，可分页查询
    queryPlatByMul: (platName: String, platCode: String, size: number, page: number) => {
        return axios.request({
            url: `/robotManage/platformMaintenance/getReport`,
            method: 'get',
            params: {
                platName: platName,
                platCode: platCode,
                size: size,
                page: page
            }
        })
    },
    // 机器人平台注册
    registerPlat: (plat) => {
        return axios.request({
            url: `/robotManage/platformMaintenance/platRegister`,
            method: 'put',
            data: plat
        })
    },
    // 机器人平台更改
    updatePlat: (plat) => {
        return axios.request({
            url: `/robotManage/platformMaintenance/platUpdate`,
            method: 'post',
            data: plat
        })
    },
    // 机器人平台注销
    deletePlat: (platId: String) => {
        return axios.request({
            url: `/robotManage/platformMaintenance/platOffline`,
            method: 'post',
            data: { platId }
        })
    },
    // 机器人平台通用参数
    getRobotParam: (taskCode: String) => {
        return axios.request({
            url: `/robotManage/platformMaintenance/getReportParam`,
            method: 'get',
           params: { taskCode }
        })
    }

}
